<template>
  <div class="box">
    <div class="head">
      <van-icon class="arrow-left" name="arrow-left" @click="goBack" /> 个人中心
      <van-icon class="setting" name="setting" />
    </div>
    <div class="content">
      <div class="reg">
        <div class="userimg">
          <img src="https://fastly.jsdelivr.net/npm/@vant/assets/cat.jpeg" />
        </div>
        <div @click="gologin">点击注册登录</div>
      </div>
      <van-grid>
        <van-grid-item icon="gold-coin-o" text="待付款" />
        <van-grid-item icon="shop-o" text="待收货" />
        <van-grid-item icon="good-job-o" text="待评价" />
        <van-grid-item icon="label-o" text="全部订单" />
      </van-grid>
      <!-- <ul class="goods-serve">
        <li>
          <van-icon name="gold-coin-o" size="2rem" />
        <span>待付款</span>
        </li>
        <li><van-icon name="shop-o" size="2rem"/>    
        <span>待收货</span>
        </li>
        <li>
          <van-icon name="good-job-o" size="2rem"/>
        <span>待评价</span>
        </li>
        <li>
          <van-icon name="label-o" size="2rem" />
        <span>全部订单</span>
        </li>
        
      </ul> -->

      <van-cell title="地址管理" is-link />
      <van-cell title="我的收藏夹" is-link />
      <van-cell title="关于我们" is-link />
      <img class="logo" src="../assets/logo.png" />
    </div>

    <FooterBarVue class="footer"></FooterBarVue>
  </div>
</template>

<script>
import FooterBarVue from "@/components/FooterBar.vue";

export default {
  name: "My",
  components: {
    FooterBarVue,
  },
  methods: {
    gologin(){
      // this.$router.push("/Reg");
      this.$router.replace("/Login");
    },
    goBack(){
      this.$router.back();
    },
  },
};
</script>

<style scoped>
.box {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background-color: #efefef;
}

.head {
  height: 3rem;
  background-color: antiquewhite;
  text-align: center;
  line-height: 3rem;
}
.arrow-left {
  float: left;
  margin: 1rem;
}
.setting {
  margin: 1rem;
  float: right;
}
.content {
  flex: 1;
  overflow: auto;
}
.reg {
  height: 6rem;
  line-height: 6rem;
  background-color: pink;
  display: flex;
  align-items: center;
}

.userimg {
  height: 5rem;
  width: 5rem;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 2rem;
}
.userimg img {
  width: 100%;
  height: 100%;
}
/* .goods-serve{
  background-color: #fff;
  height: 5.5rem;
}
.goods-serve li{
  float: left;
  width: 25%;
  height: 100%;
  box-sizing: border-box;
  border-bottom: 0.5px solid rgb(237, 233, 233) ;
  border-right: 0.5px solid rgb(237, 233, 233) ;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: .8rem;

}
.goods-serve li span{
  margin-top: .5rem;
}
.goods-serve li:last-child{
  border-right: 0;
} */
.logo {
  width: 2.5rem;
  margin: 1rem auto;
  display: block;
}
</style>